<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        
        *{
            margin: 0;
            padding: 0;

        }
        li{
            list-style: none;
        }
        .banxin{
            width: 1300px;
            height: 600px;
            background-color: blueviolet;
            margin-left: 150px;
            display: flex;
        }
        .left{
            width: 200px;
            height: 600px;
            background:rgba(67, 66, 66, 0.9);
        }
        .left li{
            width: 200px;
            height: 35px;
            line-height: 35px;
            color: white;
            
            display: flex;
        }
        .yi{
            border-bottom: 1px solid black;
        }
        .er{
            background-color: rgb(205, 205, 219);
            
        }
        .san{
            background-color: black;
        }
        .right{
            width: 1100px;
            height: 600px;
            background-color: rgb(246, 243, 243);
        }
        .head{
            width: 1100px;
            height: 40px;
            background-color: white;
            line-height: 40px;
        }
        .head span{
            margin-left: 30px;
            color: #888;
        }
        .head input {
            margin-left: 30px;
            color: #888;
        }
        .v3{
            font-size: 30px;
            margin-top: 10px;
            margin-left: 10px;
        }
        .tu1{
            width: 500px;
            height: 250px;
            background-color: white;
            margin: 20px;
        }
        .tu2{
            width: 500px;
            height: 250px;
            background-color: white;
            margin: 20px;
        }
        .tu{
            width: 1100px;
            height: 250px;
            display: flex;
            margin: 10px;
            margin-top: 20px;

        }
        .products{
            font-size: 20px;
            margin: 20px;
        }
        table{
            width: 500px;
            margin: 20px 0;
            line-height: 40px;
            text-align: center;
        }

    </style>
</head>
<body>
    <div class="banxin">
        <div class="left">
            <ul>
                <li class="yi">&nbsp; AdminLTE3</li>
                <li class="yi">&nbsp;Alexander Pierce</li>
                <li class="er">&nbsp;Dashboard &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;^</li>
                <li>&nbsp;Dashboard v1</li>
                <li>&nbsp;Dashboard v2</li>
                <li class="san">&nbsp;Dashboard v3</li>
                <li>&nbsp;Widgets</li>
                <li>&nbsp;Charts&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;UI Elements &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;Forms&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;Tables&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>  </li>
                <li>&nbsp;EXAMPLES</li>
                <li>&nbsp;Calendar&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;Mailbox&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;Pages&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
                <li>&nbsp;Extras&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<</li>
            </ul>
        </div>
        <div class="right">
            <div class="head">
                <span>Home</span>
                <span>Contact</span>
                <input type="text" placeholder="Search">
            </div>
            <div class="v3">Dashboard v3</div>
            <div class="tu">
            <div class="tu1"></div>
            <div class="tu2"></div>
            </div>
            <div class="tu">
                <div class="tu1">
                    <div class="products">Products</div>
                    <div class="xuan">
                        <table>
                            <thead>
                                <tr>
                                    <th>Product</th>
                                    <th>Price</th>
                                    <th>Sales</th>
                                    <th>More</th>
                                </tr>
                            </thead>
                            <tbody>
                                <tr>
                                    <td>Some Product</td>
                                    <td>$13 USD</td>
                                    <td>12000 Sold</td>
                                    <td>@</td>
                                </tr>
                                <tr>
                                    <td>Some Product</td>
                                    <td>$29 USD</td>
                                    <td>12350 Sold</td>
                                    <td>@</td>
                                </tr>
                            </tbody>
                        </table>

                    </div>
                </div>
                <div class="tu2">
                    <div class="products">Online Store Overview</div>
                </div>
                </div>
        </div>
    </div>

    
</body>
<script src="https://cdn.bootcdn.net/ajax/libs/echarts/5.4.0/echarts.js"></script>
<script src="./作业.js"></script>
<script src="./promise.js"></script>
<script>
    var data=document.querySelector('.tu1')
    var e=echarts.init(data)

    e.setOption({
        title: { //图表的标题
            text: 'online Store Visitors',
            left: 'center',
        },
        legend: { //图例
            top: 25,
            // right:10,
        },
        xAxis: { //x轴设置
            data: ['18th', '20th', '22th', '24th', '26th', '28th', '30th']
        },
        // yAxis: { //y轴设置
        //     splitLine: {
        //         show: true
        //     }
        // },
         
        yAxis: [{ // 纵轴标尺固定
            type: 'value',
            scale: true,
            max: 200,
            min: 0,
            splitNumber: 10,
            boundaryGap: [0.2, 0.2]
        }],
        

        series: [ //数据系列
            {
                name: '820',
                showBackground: false,//显示背景色
                backgroundStyle: {
                    //color: '',
                    borderRadius: 20, //背景圆角
                },
                smooth: true,
                itemStyle: {
                    //borderRadius:[20,0,20,0],//边框圆角 
                    borderRadius: [5],//边框圆角 
                },
                color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ //颜色(渐变色)
                    { offset: 0, color: '#83bff6' },
                    { offset: 0.5, color: '#188df0' },
                    { offset: 1, color: '#188df0' }
                ])
                ,
                type: 'line',//'line' , 'bar' , 'pie'
                data: ['60','80','70','65','82','79','100']
            },
            {
                type: 'line',//'line' , 'bar' , 'pie'
                data: [100, 120,170, 165, 180,176,160],
                symbolSize: 3, //圆点大小
                symbol: 'circle',//圆点形状
                smooth: true, //是否平滑曲线显示
                itemStyle: {
                    normal: {
                        color: 'pink', //折线颜色
                        borderWidth: 2, //圆点的边框宽度
                        borderColor: 'white', //圆点的边框颜色
                        lineStyle: { width: 2 }, //折现的宽度
                        shadowBlur: 5,
                        shadowColor: '#188df0'

                    }
                }

            }

        ]
    });
</script>
<script>
    var data=document.querySelector('.tu2')
    var e2=echarts.init(data)

    e2.setOption({
        title: { //图表的标题
            text: 'Sales'
        },
        legend: { //图例
            bottom: 20,
            right: 10,
        },
        xAxis: { //x轴设置
            data: ['JUN', 'JUL', 'AUG', 'SEP', 'OCT', 'NOV', 'DEC']
        },
        yAxis: { //y轴设置

        },
        series: [ //数据系列
            {
                name: 'This year',
                type: 'bar',
                data: [100, 120, 170, 165, 180, 178, 160],
                smooth: true, //是否平滑曲线显示
                itemStyle: {
                    normal: {
                        color: 'dodgerblue', //折线颜色
                        lineStyle: { width: 2 }, //折现的宽度
                    }
                }
            },
            {
                name: 'Last year',
                type: 'bar',
                data: [60, 80, 70, 65, 80, 78, 100],
                smooth: true, //是否平滑曲线显示
                itemStyle: {
                    normal: {
                        color: 'gray', //折线颜色
                        lineStyle: { width: 2 }, //折现的宽度
                    }
                }

            }

        ]
    });
</script>
<script>
    function render(data){
        var str=data.map((item,index)=>{
            return`
            <tr>
                                    <td>${item.name}</td>
                                    <td>${item.price}</td>
                                    <td>${item.sales}Sold</td>
                                    <td>@</td>
                            </tr>
            `
        }).join('')
        document.querySelector('tbody').innerHTML=str
    }
    render(data.list)
</script>
</html>